<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IFWiki.Models.Article>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<title>IF Wiki: Source of Revision: '<%= Html.Encode(Model.Name) %>'</title>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="menu" runat="server">
            <div id="menucontainer">
                <ul id="menu">              
                    <li><%= Html.ActionLink("Main", "Index", "Article", new { name = Model.Name }, null)%></li>
                    <li><a class="current">Source</a></li>
                   
<%    
    if (Html.ViewData.Model.IsDiscussion)  
    {
%>
                <li><%= Html.ActionLink("UnTalk", "UnTalk", "Article", new { name = Model.Name, innerType = Model.InnerType }, null)%></li>
<%
    }
    else
    {
%> 
                <li><%= Html.ActionLink("Talk", "Talk", "Article", new { name = Model.Name, innerType = Model.InnerType }, null)%></li>
<%
    }
%>
                </ul>
            
            </div>
        </div>
  </asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

            <div id="submenucontainer">
                <ul id="submenu">              
                    <li><a class="current">Source</a></li>                
<%
    if (Request.IsAuthenticated)
    {
%>
                    <li><%= Html.ActionLink("Edit", "Edit", "Article", new { name = Model.Name }, null)%></li>
<%
    }
%>                    
                    <li><%= Html.ActionLink("History", "ListRevisions", "Article", new { name = Model.Name }, null)%></li>

                </ul>
            </div>

    <h2>Revision: '<%= Html.Encode(Model.Name) %>'</h2>
    <p>Revised at <%= Html.Encode(Model.RevisedAt.ToString()) %> by <%= Html.Encode(Model.RevisedBy) %></p
    <p>Reason for revision: '<%= Html.Encode(Model.Reason) %>'</p>
    
    <p><pre><%= Html.Encode(Model.Detail) %></pre></p>
    
<%
    if (Request.IsAuthenticated)
    {
%>
    <p>
        <%=Html.ActionLink("Revert", "Revert", new { name=Model.Name, revisedAt=Model.RevisedAt }) %> 
    </p>
<%
    }
    else
    {
%>  
    <p class="note"><%= Html.ActionLink("Login", "LoiOn", "Account") %>  to allow  revert</p>
<%
    }
%>     

</asp:Content>

